<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <link rel="stylesheet" type="text/css"
          href="http://yui.yahooapis.com/3.4.1/build/cssreset/cssreset-min.css">
    <link href="http://fonts.googleapis.com/css?family=Oxygen" rel="stylesheet" type="text/css">
    <link rel="stylesheet" type="text/css" href="/stylesheets/ca_style.css">
    <link rel="stylesheet" type="text/css" href="css/topcoat-desktop-light.css">
    <link rel="stylesheet" type="text/css" href="/jslib/dojo/1.9.0/dijit/themes/claro/claro.css">
    <link rel="stylesheet" type="text/css"
	  href="lo_problem.css">
    <script src="/jslib/dojo/configure.js"></script>
    <script src="/jslib/dojo/1.9.0/dojo/dojo.js"></script>
    <script type="text/x-mathjax-config">
      MathJax.Hub.Config({
      tex2jax: { inlineMath: [['$','$'],['\\(','\\)']] }
      });
    </script>
    <script type="text/javascript" src="/jslib/mathjax/2.2/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
    <script src="lo_problem.js"></script>
    <title>7mm ATCA LO Configuration checker</title>
  </head>
  <body class="claro">
    <!--#include virtual="/includefiles/ca_header.html" -->  
    <h1>7mm ATCA LO Configuration checker</h1>

    <div class="help">
      <p>It was found in November 2013 that the algorithm used to set the LO frequency
	chain required to observe in the 7mm band (frequencies between 30 and 50 GHz)
	was sometimes causing small frequency offsets. The problem, once discovered,
	was quickly fixed, but all observations made in the 7mm band prior to this
	date (even before CABB) may have suffered because of this fault.
      </p>
      <p>This page is here so you can assess if your observations have been affected
	by this problem, and what the frequency offset was. To do this, simply enter
	the central frequencies of the two simultaneous IFs you used, select whether
	the observations were made with CABB, or with the pre-CABB system, and then
	press the "Check" button.
      </p>
      <p>If you have any questions about the problem, or this page, please contact
	<a href="mailto:Jamie.Stevens@csiro.au?Subject=7mm%20LO%20problem">
	  Jamie Stevens</a>.
      </p>
    </div>

    <div class="data-entry">
      <span class="data-heading">Simultaneous central frequencies:</span>
      <span class="frequency-entry">
	<label for="frequency-if1">IF #1</label>
	<input type="text" class="topcoat-text-input" placeholder="frequency"
	       value="" name="frequency-if1" id="frequency-if1" size="10">
	<label for="frequency-if1"> MHz</label>
      </span>
      <span class="frequency-entry">
	<label for="frequency-if2">IF #2</label>
	<input type="text" class="topcoat-text-input" placeholder="frequency"
	       value="" name="frequency-if2" id="frequency-if2" size="10">
	<label for="frequency-if2"> MHz</label>
      </span>
    </div>
    <div class="data-entry">
      <span class="data-heading">Correlator:</span>
      <div class="topcoat-tab-bar">
	<label class="topcoat-tab-bar__item">
	  <input type="radio" name="data-correlator" value="CABB" checked>
	  <button class="topcoat-tab-bar__button">CABB</button>
	</label>
	<label class="topcoat-tab-bar__item">
	  <input type="radio" name="data-correlator" value="pre-CABB">
	  <button class="topcoat-tab-bar__button">Pre-CABB</button>
	</label>
      </div>
    </div>
    <div class="data-entry">
      <button class="topcoat-button--large--cta" id="button-check">
	Check!</button>
    </div>

    <div class="result invisible transparent" id="result-unaffected">
      <p>Your observations are not affected by this bug.</p>
    </div>

    <div class="result invisible transparent" id="result-affected">
      <p>Your observations will have the wrong frequency.</p>
      <p>The frequency of IF#1 will actually be <span id="if1-real-frequency"></span> MHz,
	which is an offset of <span id="if1-offset"></span> kHz.</p>
      <p>The frequency of IF#2 will actually be <span id="if2-real-frequency"></span> MHz,
	which is an offset of <span id="if2-offset"></span> kHz.</p>
      <p class="invisible" id="cabb-zoom-warning">This frequency offset will only be 
	readily apparent in the 1 MHz zoom bands, which have channel widths of
	488 Hz. In the 64 MHz zoom bands, with channel widths of 31.25 kHz, this change
	will not be easily seen, but may still have a measurable effect. In the continuum
	bands, this offset is unimportant for all but the most precise measurements.</p>
    </div>

    <div class="pagefooter">
      <!--#include virtual="/includefiles/ca_footer.html" -->
    </div>

    <!-- The following code is for some modal windows for error alerts. -->
    <div class="md-modal md-effect-1" id="modal-error-non7mm">
      <div class="md-content">
	<h3>Frequency is not in 7mm band</h3>
	<div>
	  <p>Both frequencies must be within the 7mm band: in the range
	    of 30000 - 50000 MHz.</p>
	  <button class="md-close">Gotcha!</button>
	</div>
      </div>
    </div><!-- #modal-error-non7mm -->
      
    <div class="md-modal md-effect-1" id="modal-error-cabb-widespacing">
      <div class="md-content">
	<h3>Central frequencies too far apart</h3>
	<div>
	  <p>The continuum central frequencies must be no more
	    than 6000 MHz apart for the CABB correlator.</p>
	  <button class="md-close">Gotcha!</button>
	</div>
      </div> 
    </div> <!-- #modal-error-cabb-widespacing -->

    <div class="md-modal md-effect-1" id="modal-error-temporary">
      <div class="md-content">
	<h3>Calculator presently only supports CABB</h3>
	<div>
	  <p>This calculator will eventually work for the pre-CABB
	    correlator, but for now, it doesn't. Please check back again
	    soon.</p>
	  <button class="md-close">Gotcha!</button>
	</div>
      </div> 
    </div> <!-- #modal-error-temporary -->

    <div class="md-modal md-effect-1" id="modal-error-sideband">
      <div class="md-content">
	<h3>Mixed sideband frequencies</h3>
	<div>
	  <p>Both central frequencies need to be above or below
	    40672 MHz.</p>
	  <button class="md-close">Gotcha!</button>
	</div>
      </div> 
    </div> <!-- #modal-error-sideband -->

  </body>
</html>
